package com.hanamaki.enumTest;

/**
 * @author hanamaki
 * @version 1.0
 * @date 2021/6/29 15:15
 */
public enum StatusCodeEnum {

    SUCCESS("200"),

    ERROR("500");

    private String StatusCode;


    StatusCodeEnum(String statusCode) {
        this.StatusCode = statusCode;
    }

    public static void main(String[] args) {


        if (1 > 2) {
            System.out.println(StatusCodeEnum.SUCCESS);
        } else {
            System.out.println(StatusCodeEnum.ERROR.StatusCode);
        }


        StatusCodeEnum[] values = StatusCodeEnum.values();
        for (StatusCodeEnum value : values) {
            System.out.println(value.StatusCode);
        }

    }
}
